<template>

  <div id="app">
  	<mt-header fixed :title="headerTitle">
  	   <div></div>
       
      <mt-button v-show="ispath"  icon="back" slot="left" @click=" $router.go(-1) "></mt-button>
    </mt-header>
    <div id="nav">
   
      <!--跳转路由a标签    (router-link是封装的a标签)-->
      <!--<div v-for="(link,index) in linkList" :key="link.name">
      <router-link :to="link.path">{{link.name}}</router-link>
      <span v-if=" index !=linkList.length-1">|</span>
      </div>     -->
    </div>
    
    <!--路由渲染视窗-->
    <router-view/>
  </div>
</template>

<script type="text/javascript">
	  export default{
	  	data(){
	  		return {  		 
          linkList:[],
          ispath:false,
        
	  		}
	  	},
	  	computed:{
        headerTitle(){			//数据依赖更新时，计算属性重新触发更新

        // 判断title是否为猫眼电影，若是，则把退后附标隐藏掉
          if (this.$store.state.headerTitle!=='猪猪电影') {
                this.ispath=true          
          }else{
            this.ispath=false
          }
          return this.$store.state.headerTitle

	  		}
      },
     
	  	
	  }
 
    
</script>

<style lang="scss">
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
#nav {
  padding: 30px 30px 10px 30px ;
 
}

</style>
